/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __PWM_H__
#define __PWM_H__

/* Includes ------------------------------------------------------------------*/
#include "stm8s.h"

/* Exported types ------------------------------------------------------------*/
typedef enum{
    MODE_CONTINUOUS,
    MODE_ON,
    MODE_OFF,
    TOTAL_MODE_CNT
} e_PWM_MODE;


/* Exported constants --------------------------------------------------------*/
#define PWM_IN_PORT      (GPIOC)
#define PWM_IN_PIN       (GPIO_PIN_6)

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void PWM_Init(void);
void PWM_ChangeMode(void);
void PWM_IncFreq(void);
void PWM_DecFreq(void);
void PWM_RunOne(void);

#endif /* __PWM_H__ */

